﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Atom.Utility
{
    public class FileManage
    {
        public static void SaveFile(string fileName, string content)
        {

            try
            {

                //Stream stream = File.OpenWrite(fileName);
                using (StreamWriter writer = new StreamWriter(fileName, false))
                {

                    writer.Write(content);
                    writer.Close();
                    writer.Dispose();
                }

            }

            catch (IOException ex)
            {

                throw new Exception(ex.Message);

            }

        }
    }
}
